import { Inject, Injectable } from '@nestjs/common';
import { MongoRepository } from 'typeorm';
import { User } from './user.mongo.entity';
import { UserAddDto } from './user.dto';

@Injectable()
export class UserService {
  @Inject('USER_REPOSITORY')
  private readonly userResposity: MongoRepository<User>;

  createOrSave(user: UserAddDto) {
    return this.userResposity.save(user);
  }
}
